<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // js中原始语法的函数，即参数默认值为1
        function func(a,b){
            b = a | b;
            console.log(b);
            console.log(a);
        }
        func(2);
        // 箭头函数
        const person = {
            name:"bss",
            age:27,
            gender:"女"
        }
        function hello(obj){
            console.log("hello,"+obj.name);
        }
        hello(person);
        var hello2 = ({name})=>console.log("hello,"+name);
        hello2(person);
    </script>
</body>
</html>